
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>【代码片断加载】wordpress中的动态目录.md · 华云技术笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Shawn">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="【快捷键】Mac 终端Terminal.html" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.cooler112.top" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../">
            
                <a href="../">
            
                    
                    工具软件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../工具软件/【服务】gitbook文档管理平台.html">
            
                <a href="../工具软件/【服务】gitbook文档管理平台.html">
            
                    
                    【服务】gitbook文档管理平台.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../工具软件/【服务】Hexo基于node的表态博客系统.html">
            
                <a href="../工具软件/【服务】Hexo基于node的表态博客系统.html">
            
                    
                    【服务】Hexo基于node的表态博客系统.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../工具软件/【服务】nginx反向代理服务器.html">
            
                <a href="../工具软件/【服务】nginx反向代理服务器.html">
            
                    
                    【服务】nginx反向代理服务器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../工具软件/【服务】Redis缓存服务器.html">
            
                <a href="../工具软件/【服务】Redis缓存服务器.html">
            
                    
                    【服务】Redis缓存服务器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../工具软件/【工具】cnpm阿里npm国内Node管理工具.html">
            
                <a href="../工具软件/【工具】cnpm阿里npm国内Node管理工具.html">
            
                    
                    【工具】cnpm阿里npm国内Node管理工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../工具软件/【工具】docker容器管理工具.html">
            
                <a href="../工具软件/【工具】docker容器管理工具.html">
            
                    
                    【工具】docker容器管理工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../工具软件/【工具】git代码版本管理工具.html">
            
                <a href="../工具软件/【工具】git代码版本管理工具.html">
            
                    
                    【工具】git代码版本管理工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../工具软件/【工具】helm集群应用安装工具.html">
            
                <a href="../工具软件/【工具】helm集群应用安装工具.html">
            
                    
                    【工具】helm集群应用安装工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../工具软件/【工具】homwbrew-Mac软件包安装工具.html">
            
                <a href="../工具软件/【工具】homwbrew-Mac软件包安装工具.html">
            
                    
                    【工具】homwbrew-Mac软件包安装工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="../工具软件/【工具】Jenv-Java版本管理工具.html">
            
                <a href="../工具软件/【工具】Jenv-Java版本管理工具.html">
            
                    
                    【工具】Jenv-Java版本管理工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="../工具软件/【工具】npm-node包管理工具.html">
            
                <a href="../工具软件/【工具】npm-node包管理工具.html">
            
                    
                    【工具】npm-node包管理工具.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="../工具软件/【工具】nvm-node版本管理.html">
            
                <a href="../工具软件/【工具】nvm-node版本管理.html">
            
                    
                    【工具】nvm-node版本管理.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="../工具软件/【软件】长屏截图软件推荐.html">
            
                <a href="../工具软件/【软件】长屏截图软件推荐.html">
            
                    
                    【软件】长屏截图软件推荐.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.14" data-path="../工具软件/【软件】item-终端命令行软件.html">
            
                <a href="../工具软件/【软件】item-终端命令行软件.html">
            
                    
                    【软件】item-终端命令行软件.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.15" data-path="../工具软件/【AI】Tensorflow深度学习软件.html">
            
                <a href="../工具软件/【AI】Tensorflow深度学习软件.html">
            
                    
                    【AI】Tensorflow深度学习软件.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../">
            
                <a href="../">
            
                    
                    技巧
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.1" data-path="【代码片断加载】wordpress中的动态目录.html">
            
                <a href="【代码片断加载】wordpress中的动态目录.html">
            
                    
                    【代码片断加载】wordpress中的动态目录.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="【快捷键】Mac 终端Terminal.html">
            
                <a href="【快捷键】Mac 终端Terminal.html">
            
                    
                    【快捷键】Mac 终端Terminal.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="【快捷键】macOS 常用键盘快捷键大全.html">
            
                <a href="【快捷键】macOS 常用键盘快捷键大全.html">
            
                    
                    【快捷键】macOS 常用键盘快捷键大全.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="【快捷键】vscode快捷键.html">
            
                <a href="【快捷键】vscode快捷键.html">
            
                    
                    【快捷键】vscode快捷键.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="华为DevOps学习教程.md">
            
                <span>
            
                    
                    华为DevOps学习教程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="理解代码分层架构.md">
            
                <span>
            
                    
                    理解代码分层架构.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="免费API接口.md">
            
                <span>
            
                    
                    免费API接口.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.html">
            
                <a href="【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.html">
            
                    
                    【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../">
            
                <a href="../">
            
                    
                    命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../2.vue前端/vue基础注意事项.md">
            
                <span>
            
                    
                    vue基础注意事项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../命令/【Linux】查看信息.html">
            
                <a href="../命令/【Linux】查看信息.html">
            
                    
                    【Linux】查看信息.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../命令/【Linux】关闭swap分区.html">
            
                <a href="../命令/【Linux】关闭swap分区.html">
            
                    
                    【Linux】关闭swap分区.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../命令/【Linux】开机启动脚本.html">
            
                <a href="../命令/【Linux】开机启动脚本.html">
            
                    
                    【Linux】开机启动脚本.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../命令/【Linux】ln.html">
            
                <a href="../命令/【Linux】ln.html">
            
                    
                    【Linux】ln.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../命令/【Linux】lsof.html">
            
                <a href="../命令/【Linux】lsof.html">
            
                    
                    【Linux】lsof.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../命令/【Linux】lsof.html">
            
                <a href="../命令/【Linux】lsof.html">
            
                    
                    【Linux】lsof.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../命令/【Linux】sshd.html">
            
                <a href="../命令/【Linux】sshd.html">
            
                    
                    【Linux】sshd.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../">
            
                <a href="../">
            
                    
                    前端
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../2.vue前端/Vuex的基本使用.md">
            
                <span>
            
                    
                    Vuex的使用方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../2.vue前端/axios与请求接口配置化方法.md">
            
                <span>
            
                    
                    axios与请求接口配置化方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../2.vue前端/Sass使用要点总结.md">
            
                <span>
            
                    
                    Sass使用要点总结
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../2.vue前端/阮一峰ES学习笔记.md">
            
                <span>
            
                    
                    阮一峰ES学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../2.vue前端/Vue官方教程要点总结.md">
            
                <span>
            
                    
                    Vue官方教程要点总结
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../2.vue前端/Vuepress侧边栏动态目录生成.md">
            
                <span>
            
                    
                    Vuepress侧边栏动态目录生成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../">
            
                <a href="../">
            
                    
                    资讯
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../资讯/【大数据】Ambari管理hadoop生态圈各个组件.md">
            
                <span>
            
                    
                    Ambari管理hadoop生态圈各个组件.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../资讯/【开源软件分享】照片转素描的AI利器.md">
            
                <span>
            
                    
                    【开源软件分享】照片转素描的AI利器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../资讯/【开源系统】龙蜥社区重磅发布了开发者服务平台（devFree）和 OS 产品工程系统（anDev），.md">
            
                <span>
            
                    
                    【开源系统】龙蜥社区重磅发布了开发者服务平台（devFree）和 OS 产品工程系统（anDev），.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../资讯/【应用】massCode开源代码片段管理器.md">
            
                <span>
            
                    
                    【应用】massCode开源代码片段管理器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../资讯/【资讯】五十款阿里开源软件说明介绍.md">
            
                <span>
            
                    
                    【资讯】五十款阿里开源软件说明介绍.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../资讯/开源wiki.md">
            
                <span>
            
                    
                    开源wiki.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../资讯/容量大网盘分析.md">
            
                <span>
            
                    
                    容量大网盘分析.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../资讯/windows常用软件推荐.md">
            
                <span>
            
                    
                    windows常用软件推荐.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >【代码片断加载】wordpress中的动态目录.md</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;"><b>1. </b>wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;</a></li><ul><li><span class="title-icon "></span><a href="#&#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;"><b>1.1. </b>&#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;</a></li></ul></ul></div><a href="#wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;"><a name="wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;" class="anchor-navigation-ex-anchor" href="#wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;"><i class="fa fa-link" aria-hidden="true"></i></a>1. wordpress&#x52A8;&#x6001;&#x76EE;&#x5F55;&#x751F;&#x6210;</h1>
<h2 id="&#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;"><a name="&#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#&#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x539F;&#x6765;&#x76EE;&#x5F55;&#x624B;&#x52A8;&#x914D;&#x7F6E;</h2>
<pre><code>module.exports ={&quot;/devops/&quot;:[{&quot;text&quot;:&quot;devops&quot;,&quot;Link&quot;:&quot;/devops/&quot;},{&quot;text&quot;:&quot;&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;&quot;,&quot;collapsible&quot;:true,&quot;children&quot;:[&quot;/devops/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x4ECB;&#x7ECD;1.md&quot;,&quot;/devops/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x4ECB;&#x7ECD;2.md&quot;]}],&quot;/hbase/&quot;:[{&quot;text&quot;:&quot;hbase&quot;,&quot;Link&quot;:&quot;/hbase/&quot;},{&quot;text&quot;:&quot;&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;&quot;,&quot;collapsible&quot;:true,&quot;children&quot;:[&quot;/hbase/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x4EC0;&#x4E48;&#x662F;&#x533A;&#x5757;&#x94FE;.md&quot;,&quot;/hbase/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x533A;&#x5757;&#x94FE;&#x5173;&#x952E;&#x6280;&#x672F;.md&quot;,&quot;/hbase/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x94F6;&#x6D77;&#x533A;&#x5757;&#x94FE;.md&quot;]},{&quot;text&quot;:&quot;&#x5E94;&#x7528;&#x573A;&#x666F;&quot;,&quot;collapsible&quot;:true,&quot;children&quot;:[&quot;/hbase/&#x5E94;&#x7528;&#x573A;&#x666F;/&#x884C;&#x4E1A;&#x5E94;&#x7528;&#x573A;&#x666F;.md&quot;]}],&quot;/paas/&quot;:[{&quot;text&quot;:&quot;paas&quot;,&quot;Link&quot;:&quot;/paas/&quot;},{&quot;text&quot;:&quot;&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;&quot;,&quot;collapsible&quot;:true,&quot;children&quot;:[&quot;/paas/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x4ECB;&#x7ECD;1.md&quot;,&quot;/paas/&#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;/&#x4ECB;&#x7ECD;2.md&quot;]},{&quot;text&quot;:&quot;&#x4EA7;&#x54C1;&#x6848;&#x4F8B;&quot;,&quot;collapsible&quot;:true,&quot;children&quot;:[&quot;/paas/&#x4EA7;&#x54C1;&#x6848;&#x4F8B;/&#x6848;&#x4F8B;1.md&quot;,&quot;/paas/&#x4EA7;&#x54C1;&#x6848;&#x4F8B;/&#x6848;&#x4F8B;2.md&quot;]},{&quot;text&quot;:&quot;&#x8865;&#x5145;&#x8BF4;&#x660E;&quot;,&quot;link&quot;:&quot;/paas/&#x8865;&#x5145;&#x8BF4;&#x660E;.md&quot;}]}
</code></pre><p>&#x6307;&#x5B9A;&#x4ECE;sidebarjs&#x4E2D;&#x52A0;&#x8F7D;&#x76EE;&#x5F55;</p>
<pre><code>const {
    dir
} = require(&apos;console&apos;);
const fs = require(&apos;fs&apos;);
var path = require(&apos;path&apos;); //&#x89E3;&#x6790;&#x9700;&#x8981;&#x904D;&#x5386;&#x7684;&#x6587;&#x4EF6;&#x5939;
const filePath = &apos;./docs&apos;

//&#x6587;&#x6863;&#x904D;&#x5386;&#x758F;&#x7406;,&#x5C06;&#x6587;&#x4EF6;&#x5939;&#x4E0E;&#x6587;&#x4EF6;&#x5206;&#x522B;&#x88C5;&#x5728;&#x4E24;&#x4E2A;&#x6570;&#x7EC4;&#x4E2D;
function fileList(filePath) {
    files = fs.readdirSync(filePath)
    let objReturn = {
        fileName: [],
        fileDir: []
    }
    for (let file of files) {
        if (file === &apos;.vuepress&apos;) {
            continue
        }
        let state = fs.statSync(path.join(filePath, file))
        if (state &amp;&amp; state.isFile()) {
            objReturn.fileName.push(file)
        } else {
            objReturn.fileDir.push(file)
        }
    }
    console.log(objReturn)
    return objReturn;
}


let sideBar = {}
let result = fileList(filePath)
for (let dir1 of result.fileDir) {
    let keyName = &apos;/&apos; + dir1 + &apos;/&apos;
    sideBar[keyName] = [{
        text: dir1,
        Link: keyName
    }] //&#x6DFB;&#x52A0;&#x9ED8;&#x8BA4;&#x4E3B;&#x8DEF;&#x5F84;
    let path1 = path.join(filePath, dir1)
    let result1 = fileList(path1)
    //&#x4E8C;&#x7EA7;&#x76EE;&#x5F55;&#x5185;&#x5BB9;&#x6DFB;&#x52A0;
    for (let dir2 of result1.fileDir) {
        let subDir = {
            text: dir2,
            collapsible: true,
            children: []
        }
        let path2 = path.join(path1, dir2)
        let result2 = fileList(path2)
        console.log(&apos;fileName:&apos;, result2.fileName.map(item =&gt; (path.join(path2, item))))
        subDir.children = result2.fileName.map(item =&gt; (&apos;/&apos; + path.join(path.join(dir1, dir2), item)))
        sideBar[keyName].push(subDir)
    }
    //&#x4E00;&#x7EA7;&#x9875;&#x9762;&#x5185;&#x5BB9;&#x6DFB;&#x52A0;&#x6392;&#x9664;READ.md
    for (let file1 of result1.fileName) {
        if (file1 === &apos;README.md&apos; || file1 === &apos;readme.md&apos;) {
            continue
        }
        file1Name = file1.slice(0, file1.length - 3)
        console.log(&apos;file1Name&apos;, file1Name)
        fileItem = {
            text: file1Name,
            link: path.join(keyName, file1)
        }
        sideBar[keyName].push(fileItem)
    }
}
console.log(&apos;sideBar:&apos;, sideBar)
let content = `module.exports =${JSON.stringify(sideBar)}`;
//&#x5728;windows&#x4E0B;&#x4F1A;&#x6709;&#x8F6C;&#x4E49;&#x7B26;&#xFF0C;&#x5339;&#x914D;&#x53BB;&#x6389;
content.replace(&apos;\\&apos;, &apos;&apos;);
console.log(&apos;content:&apos;, content)
fs.writeFile(&apos;./utils/sidebar.js&apos;, content, {
    encoding: &apos;utf8&apos;
}, err =&gt; {
    console.log(err);
});
</code></pre><footer class="page-footer"><span class="copyright">&#xA9; 2022 Shawn Smith &#x5907;&#x6848;&#x53F7;&#xFF1A;<a href="https://beian.miit.gov.cn/" target="_blank">&#x8700;ICP&#x5907;2022020504&#x53F7;-1</a> all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-10-04 22:53:34
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: 技巧">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="【快捷键】Mac 终端Terminal.html" class="navigation navigation-next " aria-label="Next page: 【快捷键】Mac 终端Terminal.md">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"【代码片断加载】wordpress中的动态目录.md","level":"1.3.1","depth":2,"next":{"title":"【快捷键】Mac 终端Terminal.md","level":"1.3.2","depth":2,"path":"技巧/【快捷键】Mac 终端Terminal.md","ref":"技巧/【快捷键】Mac 终端Terminal.md","articles":[]},"previous":{"title":"技巧","level":"1.3","depth":1,"path":"README.md","ref":"README.md","articles":[{"title":"【代码片断加载】wordpress中的动态目录.md","level":"1.3.1","depth":2,"path":"技巧/【代码片断加载】wordpress中的动态目录.md","ref":"技巧/【代码片断加载】wordpress中的动态目录.md","articles":[]},{"title":"【快捷键】Mac 终端Terminal.md","level":"1.3.2","depth":2,"path":"技巧/【快捷键】Mac 终端Terminal.md","ref":"技巧/【快捷键】Mac 终端Terminal.md","articles":[]},{"title":"【快捷键】macOS 常用键盘快捷键大全.md","level":"1.3.3","depth":2,"path":"技巧/【快捷键】macOS 常用键盘快捷键大全.md","ref":"技巧/【快捷键】macOS 常用键盘快捷键大全.md","articles":[]},{"title":"【快捷键】vscode快捷键.md","level":"1.3.4","depth":2,"path":"技巧/【快捷键】vscode快捷键.md","ref":"技巧/【快捷键】vscode快捷键.md","articles":[]},{"title":"华为DevOps学习教程.md","level":"1.3.5","depth":2,"path":"技巧/华为DevOps学习教程.md","ref":"技巧/华为DevOps学习教程.md","articles":[]},{"title":"理解代码分层架构.md","level":"1.3.6","depth":2,"path":"技巧/理解代码分层架构.md","ref":"技巧/理解代码分层架构.md","articles":[]},{"title":"免费API接口.md","level":"1.3.7","depth":2,"path":"技巧/免费API接口.md","ref":"技巧/免费API接口.md","articles":[]},{"title":"【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.md","level":"1.3.8","depth":2,"path":"技巧/【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.md","ref":"技巧/【技巧】移动跨平台项目远程加载网址时，为了进行可试化调试.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["back-to-top-button","chapter-fold","-lunr","-search","search-pro","splitter","-sharing","sharing-plus","pageview-count","collapsible-menu","hide-element","anchor-navigation-ex","tbfed-pagefooter"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"© 2022 Shawn Smith 备案号：<a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">蜀ICP备2022020504号-1</a>","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"collapsible-menu":{},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"back-to-top-button":{},"pageview-count":{},"sharing":{"qq":false,"all":["douban","facebook","google","hatenaBookmark","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","vk","weibo","pocket","stumbleupon","whatsapp"],"douban":false,"facebook":false,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":true,"vk":false,"pocket":false,"google":true,"viber":false,"stumbleupon":false,"qzone":true,"linkedin":true},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Shawn","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"华云技术笔记","language":"zh-hans","links":{"sidebar":{"Home":"http://www.cooler112.top"}},"gitbook":"*","description":"干货总结，经验积累"},"file":{"path":"技巧/【代码片断加载】wordpress中的动态目录.md","mtime":"2022-10-04T14:53:34.319Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-12-28T02:25:41.497Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-collapsible-menu/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

